<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page isELIgnored="false" %>

<%

	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path ;
%>
<!DOCTYPE html>
<html>
<head>
<!-- 引入easyui的css -->
<link rel="stylesheet" type="text/css" href="<%=path%>/static/easyui_1_5_3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/static/easyui_1_5_3/themes/icon.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/static/easyui_1_5_3/demo/demo.css">
<!-- 引入easyui的js -->
<script type="text/javascript" src="<%=path%>/static/easyui_1_5_3/jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/static/easyui_1_5_3/jquery.easyui.min.js"></script>
<script src="<%=path%>/static/easyui_1_5_3/locale/easyui-lang-zh_CN.js" charset="UTF-8" type="text/javascript"></script> 

<SCRIPT src="<%=path%>/static/main.js" type=text/javascript></SCRIPT> 

<title>1510J系统</title>

<script type="text/javascript">
	//页面加载完之后，直接执行下边
	$(function() {
		$('#mainMenu').tree({
			url :  '<%=path%>/getMenu',
			parentField : 'pid',
			
			onClick : function(node) {
// 				alert(node.url);
				if (node.url) {
					var path = "<%=path%>" ;
					var src =  path  +node.url;
					if (!$.startWith(node.url, '/')) {	//不是本项目的url，例如www.baidu.com
						src = node.url;
					}
					var tabs = $('#mainTabs');
					var opts = {
						title : node.text,
						closable : true,
						//iconCls : node.iconCls,
						content : $.formatString('<iframe src="{0}" allowTransparency="true" style="border:0;width:99%;height:99%;padding-left:2px;" frameBorder="0"></iframe>', src),
						border : false,
						fit : true
					};
					if (tabs.tabs('exists', opts.title)) {
						tabs.tabs('select', opts.title);
					} else {
						tabs.tabs('add', opts);
					}
				}
			}
		});
	})
	function treeReload(){
		$('#mainMenu').tree("reload");
	}
	function zhankai(){
		$('#mainMenu').tree("expandAll");
	}
	function zhedie(){
		$('#mainMenu').tree("collapseAll");
	}
</script>

</head>
<!-- 1/. 增加class="easyui-layout" -->
<body  class="easyui-layout">
<!-- 	<div class="easyui-layout" style="width:700px;height:350px;"> -->
		<div data-options="region:'north'" style="height:50px;background:#B0C4DE;">
			<div style="font-size:20px">
				<strong><SPAN style="color: blue;font-size:40px;">1510J&nbsp;信&nbsp;息&nbsp;系&nbsp;统</SPAN></strong>
			</div>
		</div>
		<div data-options="region:'south',split:true" style="height:30px;">
		</div>
		<!-- 
		collapsed boolean 决定panel是否在初始化的时候折叠 . 
		split 	边界是固定还是 可 拖拽的。
		 -->
		<div data-options="region:'east',split: true, collapsed: true" title="通知" style="width:100px;"></div>
		<div data-options="region:'west',split:true" title="菜单" style="width:200px;">
			<div style="padding:5px;background:#fafafa;width:500px;border:1px solid #ccc">
				<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="treeReload()">刷新</a>
				<a href="#" class="easyui-linkbutton" plain="true" onclick="zhankai();">展开</a>
				<a href="#" class="easyui-linkbutton" plain="true" onclick="zhedie()">折叠</a>
			</div>
			<ul id="mainMenu" >
			</ul>
		</div>
<!-- 		中间菜单 -->
		<div data-options="region:'center',iconCls:'icon-ok'">
			<div class="easyui-tabs" id="mainTabs" data-options="fit:true,border:false,plain:true">
				<div title="欢迎使用" style="padding:10px">
					<h1 style="font-size:24px;">欢迎使用项目管理系统</h1>
				</div>
			</div>
		</div>
<!-- 	</div> -->
 
</body>
</html>